package com.shop.service.impl;

import com.shop.dao.UserInfoDao;
import com.shop.entity.UserInfo;
import com.shop.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author denpeng
 * @create 2018-05-24 13:54
 **/
@Service
public class UserServiceImpl implements UserService {

  private final UserInfoDao userInfoDao;

  @Autowired
  public UserServiceImpl(UserInfoDao userInfoDao) {
    this.userInfoDao = userInfoDao;
  }

  @Override
  public UserInfo selectByOpenid(String openid) {
    return userInfoDao.findByOpenid(openid);
  }
}
